<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project>

  <PropertyGroup>
    <!-- 
      Ensure the binaries using DiaSymReader.Native are marked as AnyCPU unless they specify 
      a different target. This should be the default behavior but recent SDK changes to more 
      correctly consider RIDs caused our behavior to change here. Once the SDK logic is settled
      here we can remove this.

      https://github.com/dotnet/sdk/issues/3495
    -->
    <PlatformTarget Condition="'$(PlatformTarget)' == ''">AnyCPU</PlatformTarget>
  </PropertyGroup>

  <!-- 
    This is adding the diasymreader native assets to the output directory of our binaries. The 
    package can't be referenced directly but rather has to have it's assets manually copied 
    out. This logic is responsible for doing that.
  -->
  <ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
    <Content Include="$(NuGetPackageRoot)\microsoft.diasymreader.native\$(MicrosoftDiaSymReaderNativeVersion)\runtimes\win\native\Microsoft.DiaSymReader.Native.x86.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Visible>false</Visible>
      <Pack>false</Pack>
    </Content>
    <Content Include="$(NuGetPackageRoot)\microsoft.diasymreader.native\$(MicrosoftDiaSymReaderNativeVersion)\runtimes\win\native\Microsoft.DiaSymReader.Native.amd64.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <Visible>false</Visible>
      <Pack>false</Pack>
    </Content>

    <PackageReference Include="Microsoft.DiaSymReader.Native" Version="$(MicrosoftDiaSymReaderNativeVersion)" ExcludeAssets="all"/>
  </ItemGroup>
</Project>
